<?php

!defined('PW_UPLOAD') && exit('Forbidden');

$pcfield = array(
	'1' => array(
		'fieldid' => '1',
		'name' => '类别',
		'fieldname' => 'pctype',
		'pcid' => '1',
		'vieworder' => '1',
		'type' => 'radio',
		'rules' => array(
			'0' => '1=婚庆类',
			'1' => '2=房产类',
			'2' => '3=汽车类',
			'3' => '4=家电类',
			'4' => '5=家装类',
			'5' => '6=生产原料',
			'6' => '7=食品类',
			'7' => '8=其他',
		),
		'ifable' => '1',
		'ifsearch' => '1',
		'ifasearch' => '1',
		'threadshow' => '1',
		'ifmust' => '0',
		'ifdel' => '1',
		'textsize' => '0',
		'descrip' => '',
	),
	'2' => array(
		'fieldid' => '2',
		'name' => '发起时间',
		'fieldname' => 'begintime',
		'pcid' => '1',
		'vieworder' => '2',
		'type' => 'calendar',
		'rules' => '',
		'ifable' => '1',
		'ifsearch' => '1',
		'ifasearch' => '1',
		'threadshow' => '0',
		'ifmust' => '1',
		'ifdel' => '1',
		'textsize' => '0',
		'descrip' => '',
	),
	'3' => array(
		'fieldid' => '3',
		'name' => '截止时间',
		'fieldname' => 'endtime',
		'pcid' => '1',
		'vieworder' => '3',
		'type' => 'calendar',
		'rules' => '',
		'ifable' => '1',
		'ifsearch' => '1',
		'ifasearch' => '1',
		'threadshow' => '1',
		'ifmust' => '1',
		'ifdel' => '1',
		'textsize' => '0',
		'descrip' => '',
	),
	'4' => array(
		'fieldid' => '4',
		'name' => '商品数量',
		'fieldname' => 'limitnum',
		'pcid' => '1',
		'vieworder' => '4',
		'type' => 'number',
		'rules' => array(
			'minnum' => '1',
			'maxnum' => '100',
		),
		'ifable' => '1',
		'ifsearch' => '0',
		'ifasearch' => '0',
		'threadshow' => '1',
		'ifmust' => '0',
		'ifdel' => '1',
		'textsize' => '0',
		'descrip' => '个（不限制，请留空）',
	),
	'5' => array(
		'fieldid' => '5',
		'name' => '报名限制',
		'fieldname' => 'objecter',
		'pcid' => '1',
		'vieworder' => '5',
		'type' => 'radio',
		'rules' => array(
			'0' => '1=所有用户',
			'1' => '2=仅好友',
		),
		'ifable' => '1',
		'ifsearch' => '0',
		'ifasearch' => '1',
		'threadshow' => '0',
		'ifmust' => '0',
		'ifdel' => '1',
		'textsize' => '0',
		'descrip' => '',
	),
	'6' => array(
		'fieldid' => '6',
		'name' => '团购价',
		'fieldname' => 'price',
		'pcid' => '1',
		'vieworder' => '7',
		'type' => 'text',
		'rules' => '',
		'ifable' => '1',
		'ifsearch' => '0',
		'ifasearch' => '0',
		'threadshow' => '0',
		'ifmust' => '0',
		'ifdel' => '1',
		'textsize' => '0',
		'descrip' => '',
	),
	'7' => array(
		'fieldid' => '7',
		'name' => '押金',
		'fieldname' => 'deposit',
		'pcid' => '1',
		'vieworder' => '8',
		'type' => 'text',
		'rules' => '',
		'ifable' => '1',
		'ifsearch' => '0',
		'ifasearch' => '0',
		'threadshow' => '0',
		'ifmust' => '0',
		'ifdel' => '1',
		'textsize' => '0',
		'descrip' => '（留空则无需支付押金）',
	),
	'8' => array(
		'fieldid' => '8',
		'name' => '支付方式',
		'fieldname' => 'payway',
		'pcid' => '1',
		'vieworder' => '9',
		'type' => 'radio',
		'rules' => array(
			'0' => '1=支付宝支付',
			'1' => '2=现金支付',
		),
		'ifable' => '1',
		'ifsearch' => '0',
		'ifasearch' => '1',
		'threadshow' => '0',
		'ifmust' => '0',
		'ifdel' => '1',
		'textsize' => '0',
		'descrip' => '',
	),
	'9' => array(
		'fieldid' => '9',
		'name' => '联系人',
		'fieldname' => 'contacter',
		'pcid' => '1',
		'vieworder' => '10',
		'type' => 'text',
		'rules' => '',
		'ifable' => '1',
		'ifsearch' => '1',
		'ifasearch' => '0',
		'threadshow' => '0',
		'ifmust' => '1',
		'ifdel' => '1',
		'textsize' => '0',
		'descrip' => '',
	),
	'10' => array(
		'fieldid' => '10',
		'name' => '电话',
		'fieldname' => 'tel',
		'pcid' => '1',
		'vieworder' => '11',
		'type' => 'text',
		'rules' => '',
		'ifable' => '1',
		'ifsearch' => '0',
		'ifasearch' => '0',
		'threadshow' => '0',
		'ifmust' => '0',
		'ifdel' => '1',
		'textsize' => '4',
		'descrip' => '',
	),
	'11' => array(
		'fieldid' => '11',
		'name' => '-',
		'fieldname' => 'phone',
		'pcid' => '1',
		'vieworder' => '11',
		'type' => 'text',
		'rules' => '',
		'ifable' => '1',
		'ifsearch' => '0',
		'ifasearch' => '0',
		'threadshow' => '0',
		'ifmust' => '0',
		'ifdel' => '1',
		'textsize' => '14',
		'descrip' => '例如：0571-12345678',
	),
	'12' => array(
		'fieldid' => '12',
		'name' => '手机',
		'fieldname' => 'mobile',
		'pcid' => '1',
		'vieworder' => '12',
		'type' => 'text',
		'rules' => '',
		'ifable' => '1',
		'ifsearch' => '0',
		'ifasearch' => '0',
		'threadshow' => '0',
		'ifmust' => '1',
		'ifdel' => '1',
		'textsize' => '0',
		'descrip' => '',
	),
	'13' => array(
		'fieldid' => '13',
		'name' => '图片上传',
		'fieldname' => 'pcattach',
		'pcid' => '1',
		'vieworder' => '13',
		'type' => 'upload',
		'rules' => '',
		'ifable' => '1',
		'ifsearch' => '0',
		'ifasearch' => '0',
		'threadshow' => '0',
		'ifmust' => '0',
		'ifdel' => '1',
		'textsize' => '0',
		'descrip' => '',
	),
	'14' => array(
		'fieldid' => '14',
		'name' => '类别',
		'fieldname' => 'pctype',
		'pcid' => '2',
		'vieworder' => '1',
		'type' => 'radio',
		'rules' => array(
			'0' => '1=出游',
			'1' => '2=聚餐 ',
			'2' => '3=舞会',
			'3' => '4=户外',
			'4' => '5=烧烤',
			'5' => '6=其他',
		),
		'ifable' => '1',
		'ifsearch' => '1',
		'ifasearch' => '1',
		'threadshow' => '1',
		'ifmust' => '0',
		'ifdel' => '1',
		'textsize' => '0',
		'descrip' => '',
	),
	'15' => array(
		'fieldid' => '15',
		'name' => '发起时间',
		'fieldname' => 'begintime',
		'pcid' => '2',
		'vieworder' => '2',
		'type' => 'calendar',
		'rules' => '',
		'ifable' => '1',
		'ifsearch' => '1',
		'ifasearch' => '1',
		'threadshow' => '0',
		'ifmust' => '1',
		'ifdel' => '1',
		'textsize' => '0',
		'descrip' => '',
	),
	'16' => array(
		'fieldid' => '16',
		'name' => '过期时间',
		'fieldname' => 'endtime',
		'pcid' => '2',
		'vieworder' => '3',
		'type' => 'calendar',
		'rules' => '',
		'ifable' => '1',
		'ifsearch' => '1',
		'ifasearch' => '1',
		'threadshow' => '1',
		'ifmust' => '1',
		'ifdel' => '1',
		'textsize' => '0',
		'descrip' => '',
	),
	'17' => array(
		'fieldid' => '17',
		'name' => '活动地点',
		'fieldname' => 'address',
		'pcid' => '2',
		'vieworder' => '4',
		'type' => 'text',
		'rules' => '',
		'ifable' => '1',
		'ifsearch' => '0',
		'ifasearch' => '1',
		'threadshow' => '1',
		'ifmust' => '0',
		'ifdel' => '1',
		'textsize' => '0',
		'descrip' => '',
	),
	'18' => array(
		'fieldid' => '18',
		'name' => '人数限制',
		'fieldname' => 'limitnum',
		'pcid' => '2',
		'vieworder' => '5',
		'type' => 'number',
		'rules' => array(
			'minnum' => '1',
			'maxnum' => '100',
		),
		'ifable' => '1',
		'ifsearch' => '0',
		'ifasearch' => '0',
		'threadshow' => '0',
		'ifmust' => '0',
		'ifdel' => '1',
		'textsize' => '0',
		'descrip' => '人（不限制，请留空）',
	),
	'19' => array(
		'fieldid' => '19',
		'name' => '报名限制',
		'fieldname' => 'objecter',
		'pcid' => '2',
		'vieworder' => '6',
		'type' => 'radio',
		'rules' => array(
			'0' => '1=所有用户',
			'1' => '2=仅好友',
		),
		'ifable' => '1',
		'ifsearch' => '0',
		'ifasearch' => '1',
		'threadshow' => '0',
		'ifmust' => '0',
		'ifdel' => '1',
		'textsize' => '0',
		'descrip' => '',
	),
	'20' => array(
		'fieldid' => '20',
		'name' => '性别限制',
		'fieldname' => 'gender',
		'pcid' => '2',
		'vieworder' => '7',
		'type' => 'radio',
		'rules' => array(
			'0' => '1=全部',
			'1' => '2=仅男生',
			'2' => '3=仅女生',
		),
		'ifable' => '1',
		'ifsearch' => '0',
		'ifasearch' => '1',
		'threadshow' => '0',
		'ifmust' => '0',
		'ifdel' => '1',
		'textsize' => '0',
		'descrip' => '',
	),
	'21' => array(
		'fieldid' => '21',
		'name' => '活动经费',
		'fieldname' => 'price',
		'pcid' => '2',
		'vieworder' => '8',
		'type' => 'text',
		'rules' => '',
		'ifable' => '1',
		'ifsearch' => '0',
		'ifasearch' => '0',
		'threadshow' => '0',
		'ifmust' => '0',
		'ifdel' => '1',
		'textsize' => '0',
		'descrip' => '元/人',
	),
	'22' => array(
		'fieldid' => '22',
		'name' => '支付方式',
		'fieldname' => 'payway',
		'pcid' => '2',
		'vieworder' => '9',
		'type' => 'radio',
		'rules' => array(
			'0' => '1=支付宝支付',
			'1' => '2=现金支付',
		),
		'ifable' => '1',
		'ifsearch' => '0',
		'ifasearch' => '1',
		'threadshow' => '0',
		'ifmust' => '0',
		'ifdel' => '1',
		'textsize' => '0',
		'descrip' => '',
	),
	'23' => array(
		'fieldid' => '23',
		'name' => '联系人',
		'fieldname' => 'contacter',
		'pcid' => '2',
		'vieworder' => '10',
		'type' => 'text',
		'rules' => '',
		'ifable' => '1',
		'ifsearch' => '0',
		'ifasearch' => '0',
		'threadshow' => '0',
		'ifmust' => '1',
		'ifdel' => '1',
		'textsize' => '0',
		'descrip' => '',
	),
	'24' => array(
		'fieldid' => '24',
		'name' => '电话',
		'fieldname' => 'tel',
		'pcid' => '2',
		'vieworder' => '11',
		'type' => 'text',
		'rules' => '',
		'ifable' => '1',
		'ifsearch' => '0',
		'ifasearch' => '0',
		'threadshow' => '0',
		'ifmust' => '0',
		'ifdel' => '1',
		'textsize' => '4',
		'descrip' => '',
	),
	'25' => array(
		'fieldid' => '25',
		'name' => '-',
		'fieldname' => 'phone',
		'pcid' => '2',
		'vieworder' => '11',
		'type' => 'text',
		'rules' => '',
		'ifable' => '1',
		'ifsearch' => '0',
		'ifasearch' => '0',
		'threadshow' => '0',
		'ifmust' => '0',
		'ifdel' => '1',
		'textsize' => '14',
		'descrip' => '例如：0571-123456778',
	),
	'26' => array(
		'fieldid' => '26',
		'name' => '手机',
		'fieldname' => 'mobile',
		'pcid' => '2',
		'vieworder' => '12',
		'type' => 'text',
		'rules' => '',
		'ifable' => '1',
		'ifsearch' => '0',
		'ifasearch' => '0',
		'threadshow' => '0',
		'ifmust' => '1',
		'ifdel' => '1',
		'textsize' => '0',
		'descrip' => '',
	),
	'27' => array(
		'fieldid' => '27',
		'name' => '图片上传',
		'fieldname' => 'pcattach',
		'pcid' => '2',
		'vieworder' => '13',
		'type' => 'upload',
		'rules' => '',
		'ifable' => '1',
		'ifsearch' => '0',
		'ifasearch' => '0',
		'threadshow' => '0',
		'ifmust' => '0',
		'ifdel' => '1',
		'textsize' => '0',
		'descrip' => '',
	),
	'28' => array(
		'fieldid' => '28',
		'name' => '旺旺',
		'fieldname' => 'wangwang',
		'pcid' => '1',
		'vieworder' => '14',
		'type' => 'text',
		'rules' => '',
		'ifable' => '1',
		'ifsearch' => '0',
		'ifasearch' => '0',
		'threadshow' => '0',
		'ifmust' => '0',
		'ifdel' => '1',
		'textsize' => '0',
		'descrip' => '',
	),
	'29' => array(
		'fieldid' => '29',
		'name' => '市场价',
		'fieldname' => 'mprice',
		'pcid' => '1',
		'vieworder' => '6',
		'type' => 'text',
		'rules' => '',
		'ifable' => '1',
		'ifsearch' => '0',
		'ifasearch' => '0',
		'threadshow' => '0',
		'ifmust' => '1',
		'ifdel' => '1',
		'textsize' => '0',
		'descrip' => '',
	),
	'30' => array(
		'fieldid' => '30',
		'name' => 'QQ',
		'fieldname' => 'qq',
		'pcid' => '1',
		'vieworder' => '15',
		'type' => 'text',
		'rules' => '',
		'ifable' => '1',
		'ifsearch' => '0',
		'ifasearch' => '0',
		'threadshow' => '0',
		'ifmust' => '0',
		'ifdel' => '0',
		'textsize' => '0',
		'descrip' => '',
	),
);
foreach ($pcfield as $key => $value){

	is_array($value['rules']) && $value['rules'] = serialize($value['rules']);
	$db->update("REPLACE INTO pw_pcfield SET ".pwSqlSingle(array(
		'fieldid'		=> $value['fieldid'],		'name'	=> $value['name'],
		'fieldname'		=> $value['fieldname'],		'pcid'	=> $value['pcid'],
		'vieworder'		=> $value['vieworder'],		'type'	=> $value['type'],
		'rules'			=> $value['rules'],			'ifable'=> $value['ifable'],
		'ifsearch'		=> $value['ifsearch'],		'ifasearch'	=> $value['ifasearch'],
		'threadshow'	=> $value['threadshow'],	'ifmust'	=> $value['ifmust'],
		'ifdel'			=> $value['ifdel'],			'textsize'	=> $value['textsize'],
		'descrip'		=> $value['descrip']
	)));
}
?>